package com.example.chirdrenserver.Pojo.vo.admin;

import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.Data;
import java.util.List;

@Data
public class AdminUserPageVO<T> { // 添加泛型参数
    private Long current;
    private Long size;
    private Long total;
    private Long pages;
    private List<T> records;  // 使用泛型类型

    // 正确的构造函数
    public AdminUserPageVO(IPage<T> page) {
        this.current = page.getCurrent();
        this.size = page.getSize();
        this.total = page.getTotal();
        this.pages = page.getPages();
        this.records = page.getRecords();
    }
}